<extend name="Public/base" />

<block name="body">
	<div class="main-title cf">
		<h2><if condition="ACTION_NAME eq 'addDepartment'">新增<else/>编辑</if>信息</h2>
	</div>
	<!-- 表单 -->
	<form id="form" action="{:U('saveInfo')}" method="post" class="form-horizontal">

		<switch name="type">
			<case value="1"><include file="EditTpl/tpl1" /></case>
			<case value="2"><include file="EditTpl/tpl2" /></case>
			<case value="3"><include file="EditTpl/tpl3" /></case>
		</switch>

		<div class="form-item">
			<input type="hidden" name="id" value="{$data.id}"/>
			<input type="hidden" name="type" value="{$type}"/>
			<button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">确 定</button>
			<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
		</div>
	</form>
</block>

<block name="script">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
<script type="text/javascript" charset="utf-8">
	Think.setValue("sex", {$info.sex|default = 0});
    var type="{$type}";
    var url;
    switch(type){
        case "1":
            url='{:U("Volunteer/voluntary")}';
            break;
        case "2":
            url='{:U("Volunteer/involuntary")}';
            break;
        case "3":
            url='{:U("Volunteer/specific")}';
            break;
    }
    highlight_subnav(url);

</script>
</block>
